<?php
class Default_Form_Search extends Zend_Form {
	public function init() {
		$this->setMethod('post');
		
		$search = $this->createElement('text', 'search');
		$search->setLabel(_('Search:'));
		$search->addFilters(array('StringTrim','StripTags'));
		$search->setAttrib('maxlength','255');
		
		$submit = $this->createElement('submit', 'submit');
		$submit->setLabel(_('Search'));
		
		$this->addElements(array($search,$submit));
		
		$this->setElementDecorators(array(
			'ViewHelper',
			array(array('data' => 'HtmlTag'), array('tag' => 'td')),
			array('Label', array('tag' => 'td')),
		));
		
		$submit->setDecorators(array('ViewHelper',
			array(array('data' => 'HtmlTag'), array('tag' => 'td')),
			array(array('emptyrow' => 'HtmlTag'), array('tag' => 'td')),
		));
		
		$this->setDecorators(array(
			'FormElements',
			array('HtmlTag', array('tag' => 'table')),
			'Form'
		));
	}
}